DisableDevtool()
var dv = document.getElementById('dv')
var btu = document.getElementById('btu')
var btu1 = document.getElementById('btu1')
var ula = document.createElement('ul')
dv.appendChild(ula)
var oLi = document.getElementsByTagName('li')
var arr = [
	'郜嘉乐',
	'李文轩',
	'高俊',
	'张荣贵',
	'赵俊哲',
	'牛豫杰',
	'冯紫洋',
	'贾勇超',
	'王广哲',
	'刘立赐',
	'芦海涛',
	'芦俊洁',
	'杨冰阳',
	'王志华',
	'丁乐',
	'秦煜珉',
	'祁立',
	'姚焱飞',
	'高晨松',
	'高振',
	'李鑫玉',
	'杨鸿成',
	'李琳',
	'王子洲',
	'李欣琳',
	'靳三磊',
	'张宗良',
	'申建璞',
	'张和周',
	'李彦芳',
	'赵丞昱',
	'宋瑞良',
	'成广昌',
	'李明远',
	'申伟鸣',
	'申骐铵',
	'康鑫宇',
	'钱峣',
	'畅姚',
	'马团',
	'刘浦源',
	'王林涛',
	'白纯豪',
	'李留通',
	'张宜恒',
	'郭浩轩',
	'申园博',
	'高云鹏',
	'张小陆',
	'尹志毅',
	'罗天玉',
	'袁威骑',
	'朱少朴',
	'王开',
	'周栗葳',
]

var VIPNum = 100
let VIP = ['郜嘉乐', ]
for (var i = 0; i < arr.length; i++) {
	var liObj = document.createElement('li')
	liObj.innerText = arr[i]
	ula.appendChild(liObj)
}

var timer = null
let peopleIndex = 0
btu.onclick = function() {
	clearInterval(timer)
	timer = setInterval(function() {
		let loopArr = []
		loopArr = arr
		if (VIPNum > 0) {
			loopArr = arr.filter((item) => !VIP.includes(item))
		}
		var i = Math.floor(Math.random() * arr.length)
		peopleIndex = Math.floor(Math.random() * loopArr.length)
		resetClass()
		oLi[i].className = 'change'
	}, 50)
}

btu1.onclick = function() {
	VIPNum -= 1
	clearInterval(timer)
	var nameSpan = document.getElementsByClassName('name')[0]
	resetClass()
	oLi[peopleIndex].className = 'change'
	nameSpan.innerText = arr[peopleIndex]
}

function resetClass() {
	for (var j = 0; j < oLi.length; j++) {
		oLi[j].removeAttribute('class')
	}
}